<i><%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>返利-订单表管理</title>
<meta
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
	name="viewport">
<jsp:include page="../com/header.jsp"></jsp:include>
<script type="text/javascript" src="../../js/comm/listcomm.js"></script>
<script type="text/javascript" src="fanliOrder.js"></script>
<script type="text/javascript">
	var contentUrl = root + "cms/fanliOrder/findFanliOrderNEStatusPage";
	var editUrl = 'fanliOrderEdit.jsp?id=';
	var operateUrl = root + 'cms/fanliOrder/operateFanliOrderByIds';
	function getfilter() {
		var _jsonFilter = "{";
		if ($("#search_busId").val() && $("#search_busId").val().length > 0) {
			_jsonFilter += "'search_EQ_busId':'"
					+ $("#search_busId").val().replace("'", "\"") + "',";
		}
		if ($("#search_creatOrderTime").val()
				&& $("#search_creatOrderTime").val().length > 0) {
			_jsonFilter += "'search_EQ_creatOrderTime':'"
					+ $("#search_creatOrderTime").val().replace("'", "\"")
					+ "',";
		}
		if ($("#search_faliOrderStatus").val()
				&& $("#search_faliOrderStatus").val().length > 0) {
			_jsonFilter += "'search_EQ_faliOrderStatus':'"
					+ $("#search_faliOrderStatus").val().replace("'", "\"")
					+ "',";
		}
		if (($("#startTime").val() && $("#startTime").val().length > 0)
				&& $("#endTime").val() <= 0) {
			_jsonFilter += "'search_GT_createTime':'" + $("#startTime").val()
					+ "',";
		}
		if (($("#endTime").val() && $("#endTime").val().length > 0)
				&& $("#startTime").val().length <= 0) {
			_jsonFilter += "'search_LT_createTime':'" + $("#endTime").val()
					+ "',";
		}
		if (($("#endTime").val() && $("#endTime").val().length > 0)
				&& ($("#startTime").val() && $("#startTime").val().length > 0)) {
			_jsonFilter += "'search_BETWEEN_createTime':'"
					+ $("#startTime").val() + "," + $("#endTime").val() + "',";
		}
		if (_jsonFilter != "{") {
			_jsonFilter = _jsonFilter.substring(0, _jsonFilter.length - 1);
		}
		_jsonFilter += "}";
		return _jsonFilter;
	}
</script>
</head>
<body>
	<section>
		<div>
			<div class="col-xs-12">
				<div class="box">
					<form id="search_form" class="form-horizontal">
						<div class="tabSelect" id="selectHeadId">
							<br>
							<div class="form-group  col-md-3 search-form">
								<label class="col-md-4 control-label controls"
									for="formGroupInputSmall">商家编号：</label>
								<div class="col-md-8">
									<input type="text" placeholder="商家编号"
										class="form-control input-sm" id="search_busId" name="busId">
								</div>
							</div>

							<div class="form-group  col-md-3 search-form">
								<label class="col-md-4 control-label controls">下单时间：</label>
								<div class="col-md-8" style="padding-right:0;position:relative;">
									<div class="datetime_clear"></div>
									<input type="text" placeholder="开始时间" readOnly=""
										class="form-control input-sm" id="startTime" name="createTime">
								</div>
							</div>
							<div class="form-group  col-md-3 search-form">
								<label class="col-md-1 control-label controls">至</label>
								<div class="col-md-8" style="padding-right:0;position:relative;">
									<div class="datetime_clear"></div>
									<input type="text" placeholder="结束时间" readOnly=""
										class="form-control input-sm" id="endTime" name="createTime">
								</div>
							</div>

							<div class="form-group  col-md-3 search-form">
								<label class="col-md-4 control-label controls"
									for="formGroupInputSmall">返利订单状态：</label>
								<div class="col-md-8">
									<select class="form-control input-sm"
										id="search_faliOrderStatus" name="faliOrderStatus">
										<option value="">请选择</option>
										<option value="0">即将可以用返利</option>
										<option value="1">已返利</option>
										<option value="2">无返利</option>
									</select>
								</div>
							</div>
							<input type="button" value="查询" id="search"
								class="btn btn-primary searchBtn">
						</div>
					</form>
					<div class="box-body table-responsive" style="clear:both;">
						<input type="button" value="查看" id="detailgold" class="btn btn-color">
						<input type="button" value="导出" id="dataexport" class="btn btn-color">
					</div>
					<div class="box-body table-responsive">
						<table id="example2" class="table table-bordered table-hover">
							<thead>
								<tr>
									<th width="30"><input type="checkbox" id="_selectAll"></th>
									<th width="80">商家编号</th>
									<th width="80">下单时间</th>
									<th width="80">订单金额</th>
									<th width="80">订单号</th>
									<th width="80">商品名称</th>
									<th width="80">商品简介</th>
									<th width="80">商品图片</th>
									<th width="80">预计返利金额</th>
									<th width="80">预计返利日期</th>
									<th width="80">返利订单状态</th>
									<th width="80">状态</th>
								</tr>
							</thead>
							<!-- 表格内容 start -->
							<tbody id="mycontent"></tbody>
							<!-- 表格内容 end -->
						</table>
						<!-- 分页标签 start -->
						<div class="row page_big_div" id="displayPage"></div>
						<!-- 分页标签 end -->
						<script id="tableContentTmple" type="text/x-jsrender">
								<tr>
									<td><input id="ck_{{:id}}" ckId="{{:id}}" ckStatus="{{:status}}" class="ckSelect" type="checkbox" /></td>
									<td>{{:busId}}</td>
									<td>{{:creatOrderTime}}</td>
									<td title={{:orderMoney}} style="vertical-align:middle; text-align:right;">{{toThousands:orderMoney}}</td>
									<td>{{:orderNo}}</td>
									<td title={{:shopName}} style="vertical-align:middle; text-align:left;">{{subStrings:shopName lens=25}}</td>
									<%--<td>{{:shopBrief}}</td> --%>
									<td>
										{{if shopImg}}
                                         	<img src="../../{{:shopImg}}" class="img" height="40" width="50">
                                     	{{/if}}
									</td>
									<td title={{:fanliMoney}} style="vertical-align:middle; text-align:right;">{{toThousands:fanliMoney}}</td>
									<td>{{:faliTime}}</td>
									<td style="vertical-align:middle; text-align:left;">{{if faliOrderStatus==0}}即将可以用返利{{else faliOrderStatus==1}}已经返利{{else faliOrderStatus==2}}无返利{{else}}无效{{/if}}</td>
									<td>{{if status==1}}正常{{else status==2}}已发布{{else status==3}}已删除{{else status==-1}}已锁定{{else}}无效{{/if}}</td>
								</tr>
						  </script>
					</div>
				</div>
			</div>
		</div>
	</section>

	<!-- 详细信息 -->
      <div class="modal fade" id="myModals" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<form id="validateForm" class="form-horizontal">
			<div class="modal-dialog">
				<div class="modal-content" style="width:900px;margin-left:-100px;">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">详细信息</h4>
					</div>
					<div class="modal-body detail">
						
					</div>
					<div class="modal-bodyclass">
                       	    <script id="commentContentTmple" type="text/x-jsrender">
                             <div class="form-group">
			                    	<label for="userPhoto2" class="control-label col-md-2">商家编号：</label>
			                       	<div class="controls col-md-3" style="line-height:30px;font-weight:normal;">
					                  {{:busId}}
				                    </div>
							</div>
                             <div class="form-group">
				                    <label for="userPhoto2" class="control-label col-md-2">下单时间：</label>
				                    <div class="controls col-md-3" style="line-height:30px;font-weight:normal;">
					                 {{:travelTable.slogan}}
				                    </div>
			                </div>
                             <div class="form-group">
			                    	<label for="userPhoto2" class="control-label col-md-2">订单金额：</label>
			                       	<div class="controls col-md-3" style="line-height:30px;font-weight:normal;">
					                 {{:orderMoney}}
				                    </div>
			                    	<label for="userPhoto2" class="control-label col-md-2">订单号：</label>
			                       	<div class="controls col-md-3" style="line-height:30px;font-weight:normal;">
					                 {{:orderNo}}
				                    </div>
			                </div>
							<div class="form-group">
				                    <label for="userPhoto2" class="control-label col-md-2">商品名称：</label>
				                    <div class="controls col-md-3" style="line-height:30px;font-weight:normal;">
					                 {{:shopName}}
				                    </div>
									 <label for="userPhoto2" class="control-label col-md-2">预计返利金额：</label>
				                    <div class="controls col-md-3" style="line-height:30px;font-weight:normal;">
					                 {{:fanliMoney}}
				                    </div>
			                </div>
							<div class="form-group">
			                    	<label for="userPhoto2" class="control-label col-md-2">预计返利日期：</label>
			                       	<div class="controls col-md-3" style="line-height:30px;font-weight:normal;">
					                 {{:faliTime}}
				                    </div>
				                    <label for="userPhoto2" class="control-label col-md-2">返利订单状态：</label>
				                    <div class="controls col-md-3" style="line-height:30px;font-weight:normal;">
					                 {{if faliOrderStatus==0}}即将可以用返利{{else faliOrderStatus==1}}已经返利{{else faliOrderStatus==2}}无返利{{else}}无效{{/if}}
				                    </div>
			                </div>
							<div class="form-group">
									<label for="userPhoto2" class="control-label col-md-2">状态：</label>
				                    <div class="controls col-md-3" style="line-height:30px;font-weight:normal;">
					                 {{if status==1}}正常{{else status==2}}已发布{{else status==3}}已删除{{else status==-1}}已锁定{{else}}无效{{/if}}
				                    </div>
							</div>
							<div class="form-group">
			                    	<label for="userPhoto2" class="control-label col-md-2">商品图片:</label>
			                       	<div class="controls col-md-3" style="line-height:30px;font-weight:normal;">
					                  {{for shopImg}}
                                             <img src="../../{{:}}" class="img" height="40" width="50">
                                       {{/for}}
				                    </div>
							</div>
							<div class="form-group">
			                    	<label for="userPhoto2" class="control-label col-md-2">商品简介:</label>
									<div class="controls" style="line-height:30px;font-weight:normal;width:600px;overflow-y:scroll;height: 400px;float:left;margin-left: 40px;">
					                   {{:shopBrief}}
				                    </div>
			                </div>
                            </script>
                    </div>
                    <div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					</div>
				</div>
			</div>
		</form>
	</div>
</body>
</html></i>